# coding: utf-8

import bs4
from scrapy.contrib.spiders.crawl import CrawlSpider
import scrapy
from ..items import SoufItem



class SoufSpider(CrawlSpider):

    #
    # 搜房网 规则
    #

    name = 'soufspider'
    allowed_domains = ['fang.com']
    start_urls = ['http://www.fang.com/SoufunFamily.htm']
    website_possible_httpstatus_list = [404]

    def parse(self, response):

        citybox = [
            ['永康', 'yongkang', 'http://newhouse.yongkang.fang.com/house/s/'],
            ['义乌', 'yiwu', 'http://newhouse.yiwu.fang.com/house/s/'],
            ['无极', 'hbwj', 'http://newhouse.hbwj.fang.com/house/s/'],
            ['巢湖', 'chaohu', 'http://newhouse.chaohu.fang.com/house/s/'],
            ['楚雄', 'chuxiong', 'http://newhouse.chuxiong.fang.com/house/s/'],
            ['朝阳', 'chaoyang', 'http://newhouse.chaoyang.fang.com/house/s/'],
            ['长治', 'changzhi', 'http://newhouse.changzhi.fang.com/house/s/'],
            ['新乐', 'xinle', 'http://newhouse.xinle.fang.com/house/s/'],
            ['枣阳', 'hbzy', 'http://newhouse.hbzy.fang.com/house/s/'],
            ['郴州', 'chenzhou', 'http://newhouse.chenzhou.fang.com/house/s/'],
            ['镇海', 'zhenhai', 'http://newhouse.zhenhai.fang.com/house/s/'],
            ['周至', 'zhouzhi', 'http://newhouse.zhouzhi.fang.com/house/s/'],
            ['赵县', 'hbzx', 'http://newhouse.hbzx.fang.com/house/s/'],
            ['钟祥', 'zhongxiang', 'http://newhouse.zhongxiang.fang.com/house/s/'],
            ['肇源', 'zhaoyuan', 'http://newhouse.zhaoyuan.fang.com/house/s/'],
            ['肇州', 'zhaozhou', 'http://newhouse.zhaozhou.fang.com/house/s/'],
            ['中牟', 'zhongmou', 'http://newhouse.zhongmou.fang.com/house/s/'],
            ['邹城', 'zoucheng', 'http://newhouse.zoucheng.fang.com/house/s/'],
            ['邹平', 'zouping', 'http://newhouse.zouping.fang.com/house/s/'],
            ['枝江', 'zhijiang', 'http://newhouse.zhijiang.fang.com/house/s/'],
            ['遵化', 'zunhua', 'http://newhouse.zunhua.fang.com/house/s/'],
            ['忠县', 'cqzhongxian', 'http://newhouse.cqzhongxian.fang.com/house/s/'],
            ['庄河', 'lnzh', 'http://newhouse.lnzh.fang.com/house/s/'],
            ['肇东', 'zhaodong', 'http://newhouse.zhaodong.fang.com/house/s/'],
            ['诸暨', 'zhuji', 'http://newhouse.zhuji.fang.com/house/s/'],
            ['张掖', 'zhangye', 'http://newhouse.zhangye.fang.com/house/s/'],
            ['招远', 'zy', 'http://newhouse.zy.fang.com/house/s/'],
            ['诸城', 'zhucheng', 'http://newhouse.zhucheng.fang.com/house/s/'],
            ['章丘', 'zhangqiu', 'http://newhouse.zhangqiu.fang.com/house/s/'],
            ['资阳', 'ziyang', 'http://newhouse.ziyang.fang.com/house/s/'],
            ['昭通', 'zhaotong', 'http://newhouse.zhaotong.fang.com/house/s/'],
            ['遵义', 'zunyi', 'http://newhouse.zunyi.fang.com/house/s/'],
            ['张家界', 'zhangjiajie', 'http://newhouse.zhangjiajie.fang.com/house/s/'],
            ['张家口', 'zhangjiakou', 'http://newhouse.zhangjiakou.fang.com/house/s/'],
            ['肇庆', 'zhaoqing', 'http://newhouse.zhaoqing.fang.com/house/s/'],
            ['枣庄', 'zaozhuang', 'http://newhouse.zaozhuang.fang.com/house/s/'],
            ['自贡', 'zigong', 'http://newhouse.zigong.fang.com/house/s/'],
            ['张家港', 'zjg', 'http://newhouse.zjg.fang.com/house/s/'],
            ['周口', 'zhoukou', 'http://newhouse.zhoukou.fang.com/house/s/'],
            ['驻马店', 'zhumadian', 'http://newhouse.zhumadian.fang.com/house/s/'],
            ['宜城', 'hbyc', 'http://newhouse.hbyc.fang.com/house/s/'],
            ['永安', 'ya', 'http://newhouse.ya.fang.com/house/s/'],
            ['永城', 'yongcheng', 'http://newhouse.yongcheng.fang.com/house/s/'],
            ['玉山', 'ksys', 'http://newhouse.ksys.fang.com/house/s/'],
            ['永泰', 'yongtai', 'http://newhouse.yongtai.fang.com/house/s/'],
            ['阳曲', 'yangqu', 'http://newhouse.yangqu.fang.com/house/s/'],
            ['宜良', 'ynyl', 'http://newhouse.ynyl.fang.com/house/s/'],
            ['永春', 'yongchun', 'http://newhouse.yongchun.fang.com/house/s/'],
            ['玉田', 'yutian', 'http://newhouse.yutian.fang.com/house/s/'],
            ['宜阳', 'hnyy', 'http://newhouse.hnyy.fang.com/house/s/'],
            ['永登', 'yongdeng', 'http://newhouse.yongdeng.fang.com/house/s/'],
            ['元氏', 'hbys', 'http://newhouse.hbys.fang.com/house/s/'],
            ['榆树', 'jlys', 'http://newhouse.jlys.fang.com/house/s/'],
            ['云阳', 'cqyunyang', 'http://newhouse.cqyunyang.fang.com/house/s/'],
            ['偃师', 'yanshi', 'http://newhouse.yanshi.fang.com/house/s/'],
            ['邕宁', 'yongning', 'http://newhouse.yongning.fang.com/house/s/'],
            ['榆中', 'yuzhong', 'http://newhouse.yuzhong.fang.com/house/s/'],
            ['宜都', 'yidu', 'http://newhouse.yidu.fang.com/house/s/'],
            ['依兰', 'yilan', 'http://newhouse.yilan.fang.com/house/s/'],
            ['玉环', 'yuhuan', 'http://newhouse.yuhuan.fang.com/house/s/'],
            ['仪征', 'yizheng', 'http://newhouse.yizheng.fang.com/house/s/'],
            ['余姚', 'yuyao', 'http://newhouse.yuyao.fang.com/house/s/'],
            ['中卫', 'zhongwei', 'http://newhouse.zhongwei.fang.com/house/s/'],
            ['阳春', 'yangchun', 'http://newhouse.yangchun.fang.com/house/s/'],
            ['禹州', 'hnyz', 'http://newhouse.hnyz.fang.com/house/s/'],
            ['伊川', 'yichuan', 'http://newhouse.yichuan.fang.com/house/s/'],
            ['鄢陵', 'yanling', 'http://newhouse.yanling.fang.com/house/s/'],
            ['乐清', 'yueqing', 'http://newhouse.yueqing.fang.com/house/s/'],
            ['玉树', 'yushu', 'http://newhouse.yushu.fang.com/house/s/'],
            ['宜兴', 'yixing', 'http://newhouse.yixing.fang.com/house/s/'],
            ['永川', 'yongchuan', 'http://newhouse.yongchuan.fang.com/house/s/'],
            ['云浮', 'yunfu', 'http://newhouse.yunfu.fang.com/house/s/'],
            ['伊春', 'hljyichun', 'http://newhouse.hljyichun.fang.com/house/s/'],
            ['运城', 'yuncheng', 'http://newhouse.yuncheng.fang.com/house/s/'],
            ['益阳', 'yiyang', 'http://newhouse.yiyang.fang.com/house/s/'],
            ['伊犁', 'yili', 'http://newhouse.yili.fang.com/house/s/'],
            ['雅安', 'yaan', 'http://newhouse.yaan.fang.com/house/s/'],
            ['阳泉', 'yangquan', 'http://newhouse.yangquan.fang.com/house/s/'],
            ['宜春', 'yichun', 'http://newhouse.yichun.fang.com/house/s/'],
            ['永州', 'yongzhou', 'http://newhouse.yongzhou.fang.com/house/s/'],
            ['延边', 'yanbian', 'http://newhouse.yanbian.fang.com/house/s/'],
            ['玉溪', 'yuxi', 'http://newhouse.yuxi.fang.com/house/s/'],
            ['榆林', 'sxyulin', 'http://newhouse.sxyulin.fang.com/house/s/'],
            ['鹰潭', 'yingtan', 'http://newhouse.yingtan.fang.com/house/s/'],
            ['宜宾', 'yibin', 'http://newhouse.yibin.fang.com/house/s/'],
            ['玉林', 'yl', 'http://newhouse.yl.fang.com/house/s/'],
            ['延安', 'yanan', 'http://newhouse.yanan.fang.com/house/s/'],
            ['新丰', 'xf', 'http://newhouse.xf.fang.com/house/s/'],
            ['锡林浩特', 'xilinhaote', 'http://newhouse.xilinhaote.fang.com/house/s/'],
            ['营口', 'yk', 'http://newhouse.yk.fang.com/house/s/'],
            ['新津', 'xinjin', 'http://newhouse.xinjin.fang.com/house/s/'],
            ['新建', 'xinjian', 'http://newhouse.xinjian.fang.com/house/s/'],
            ['湘乡', 'xiangxiang', 'http://newhouse.xiangxiang.fang.com/house/s/'],
            ['辛集', 'xinji', 'http://newhouse.xinji.fang.com/house/s/'],
            ['攸县', 'youxian', 'http://newhouse.youxian.fang.com/house/s/'],
            ['新安', 'hnxa', 'http://newhouse.hnxa.fang.com/house/s/'],
            ['新民', 'xinmin', 'http://newhouse.xinmin.fang.com/house/s/'],
            ['修文', 'xiuwen', 'http://newhouse.xiuwen.fang.com/house/s/'],
            ['新密', 'xinmi', 'http://newhouse.xinmi.fang.com/house/s/'],
            ['荥阳', 'xingyang', 'http://newhouse.xingyang.fang.com/house/s/'],
            ['象山', 'zjxs', 'http://newhouse.zjxs.fang.com/house/s/'],
            ['新郑', 'xinzheng', 'http://newhouse.xinzheng.fang.com/house/s/'],
            ['新泰', 'xintai', 'http://newhouse.xintai.fang.com/house/s/'],
            ['兴化', 'xinghua', 'http://newhouse.xinghua.fang.com/house/s/'],
            ['仙桃', 'xiantao', 'http://newhouse.xiantao.fang.com/house/s/'],
            ['兴安盟', 'xam', 'http://newhouse.xam.fang.com/house/s/'],
            ['西双版纳', 'xishuangbanna', 'http://newhouse.xishuangbanna.fang.com/house/s/'],
            ['咸宁', 'xianning', 'http://newhouse.xianning.fang.com/house/s/'],
            ['新余', 'xinyu', 'http://newhouse.xinyu.fang.com/house/s/'],
            ['新沂', 'xinyi', 'http://newhouse.xinyi.fang.com/house/s/'],
            ['湘西', 'xiangxi', 'http://newhouse.xiangxi.fang.com/house/s/'],
            ['咸阳', 'xianyang', 'http://newhouse.xianyang.fang.com/house/s/'],
            ['信阳', 'xinyang', 'http://newhouse.xinyang.fang.com/house/s/'],
            ['锡林郭勒盟', 'xlglm', 'http://newhouse.xlglm.fang.com/house/s/'],
            ['忻州', 'xinzhou', 'http://newhouse.xinzhou.fang.com/house/s/'],
            ['许昌', 'xuchang', 'http://newhouse.xuchang.fang.com/house/s/'],
            ['新乡', 'xx', 'http://newhouse.xx.fang.com/house/s/'],
            ['宣城', 'xuancheng', 'http://newhouse.xuancheng.fang.com/house/s/'],
            ['孝感', 'xiaogan', 'http://newhouse.xiaogan.fang.com/house/s/'],
            ['舞钢', 'wg', 'http://newhouse.wg.fang.com/house/s/'],
            ['五河', 'wuhe', 'http://newhouse.wuhe.fang.com/house/s/'],
            ['望城', 'cswc', 'http://newhouse.cswc.fang.com/house/s/'],
            ['万宁', 'wanning', 'http://newhouse.wanning.fang.com/house/s/'],
            ['武安', 'wuan', 'http://newhouse.wuan.fang.com/house/s/'],
            ['五指山', 'wuzhishan', 'http://newhouse.wuzhishan.fang.com/house/s/'],
            ['巫山', 'wushan', 'http://newhouse.wushan.fang.com/house/s/'],
            ['五家渠', 'wujiaqu', 'http://newhouse.wujiaqu.fang.com/house/s/'],
            ['文安', 'wenan', 'http://newhouse.wenan.fang.com/house/s/'],
            ['文安', 'wenan', 'http://newhouse.wenan.fang.com/house/s/'],
            ['瓦房店', 'wafangdian', 'http://newhouse.wafangdian.fang.com/house/s/'],
            ['温岭', 'wenling', 'http://newhouse.wenling.fang.com/house/s/'],
            ['万州', 'wanzhou', 'http://newhouse.wanzhou.fang.com/house/s/'],
            ['武威', 'wuwei', 'http://newhouse.wuwei.fang.com/house/s/'],
            ['梧州', 'wuzhou', 'http://newhouse.wuzhou.fang.com/house/s/'],
            ['吴忠', 'wuzhong', 'http://newhouse.wuzhong.fang.com/house/s/'],
            ['文山', 'wenshan', 'http://newhouse.wenshan.fang.com/house/s/'],
            ['渭南', 'weinan', 'http://newhouse.weinan.fang.com/house/s/'],
            ['乌海', 'wuhai', 'http://newhouse.wuhai.fang.com/house/s/'],
            ['武隆', 'cqwulong', 'http://newhouse.cqwulong.fang.com/house/s/'],
            ['五常', 'wuchang', 'http://newhouse.wuchang.fang.com/house/s/'],
            ['乌兰察布', 'wlcb', 'http://newhouse.wlcb.fang.com/house/s/'],
            ['桐城', 'tongcheng', 'http://newhouse.tongcheng.fang.com/house/s/'],
            ['泰兴', 'taixing', 'http://newhouse.taixing.fang.com/house/s/'],
            ['滕州', 'tengzhou', 'http://newhouse.tengzhou.fang.com/house/s/'],
            ['台山', 'taishan', 'http://newhouse.taishan.fang.com/house/s/'],
            ['潼南', 'cqtongnan', 'http://newhouse.cqtongnan.fang.com/house/s/'],
            ['桐乡', 'tongxiang', 'http://newhouse.tongxiang.fang.com/house/s/'],
            ['铜梁', 'cqtongliang', 'http://newhouse.cqtongliang.fang.com/house/s/'],
            ['台安', 'lnta', 'http://newhouse.lnta.fang.com/house/s/'],
            ['铜山', 'tongshan', 'http://newhouse.tongshan.fang.com/house/s/'],
            ['桐庐', 'zjtl', 'http://newhouse.zjtl.fang.com/house/s/'],
            ['天门', 'tianmen', 'http://newhouse.tianmen.fang.com/house/s/'],
            ['图木舒克', 'tmsk', 'http://newhouse.tmsk.fang.com/house/s/'],
            ['泰安', 'taian', 'http://newhouse.taian.fang.com/house/s/'],
            ['铜川', 'tongchuan', 'http://newhouse.tongchuan.fang.com/house/s/'],
            ['通化', 'tonghua', 'http://newhouse.tonghua.fang.com/house/s/'],
            ['太仓', 'tc', 'http://newhouse.tc.fang.com/house/s/'],
            ['天水', 'tianshui', 'http://newhouse.tianshui.fang.com/house/s/'],
            ['铁岭', 'tieling', 'http://newhouse.tieling.fang.com/house/s/'],
            ['铜陵', 'tongling', 'http://newhouse.tongling.fang.com/house/s/'],
            ['铜仁', 'tongren', 'http://newhouse.tongren.fang.com/house/s/'],
            ['吐鲁番', 'tulufan', 'http://newhouse.tulufan.fang.com/house/s/'],
            ['三河', 'hbsh', 'http://newhouse.hbsh.fang.com/house/s/'],
            ['嵩县', 'songxian', 'http://newhouse.songxian.fang.com/house/s/'],
            ['深州', 'hbsz', 'http://newhouse.hbsz.fang.com/house/s/'],
            ['尚志', 'shangzhi', 'http://newhouse.shangzhi.fang.com/house/s/'],
            ['山南', 'shannan', 'http://newhouse.shannan.fang.com/house/s/'],
            ['石狮', 'shishi', 'http://newhouse.shishi.fang.com/house/s/'],
            ['睢宁', 'jssn', 'http://newhouse.jssn.fang.com/house/s/'],
            ['石柱', 'cqshizhu', 'http://newhouse.cqshizhu.fang.com/house/s/'],
            ['沭阳', 'shuyang', 'http://newhouse.shuyang.fang.com/house/s/'],
            ['寿光', 'sg', 'http://newhouse.sg.fang.com/house/s/'],
            ['商洛', 'shangluo', 'http://newhouse.shangluo.fang.com/house/s/'],
            ['遂宁', 'suining', 'http://newhouse.suining.fang.com/house/s/'],
            ['上饶', 'shangrao', 'http://newhouse.shangrao.fang.com/house/s/'],
            ['随州', 'suizhou', 'http://newhouse.suizhou.fang.com/house/s/'],
            ['商河', 'sdsh', 'http://newhouse.sdsh.fang.com/house/s/'],
            ['朔州', 'shuozhou', 'http://newhouse.shuozhou.fang.com/house/s/'],
            ['双鸭山', 'shuangyashan', 'http://newhouse.shuangyashan.fang.com/house/s/'],
            ['松原', 'songyuan', 'http://newhouse.songyuan.fang.com/house/s/'],
            ['汕尾', 'shanwei', 'http://newhouse.shanwei.fang.com/house/s/'],
            ['邵阳', 'shaoyang', 'http://newhouse.shaoyang.fang.com/house/s/'],
            ['四平', 'siping', 'http://newhouse.siping.fang.com/house/s/'],
            ['石嘴山', 'shizuishan', 'http://newhouse.shizuishan.fang.com/house/s/'],
            ['三门峡', 'sanmenxia', 'http://newhouse.sanmenxia.fang.com/house/s/'],
            ['神农架', 'shennongjia', 'http://newhouse.shennongjia.fang.com/house/s/'],
            ['商丘', 'shangqiu', 'http://newhouse.shangqiu.fang.com/house/s/'],
            ['三沙', 'sansha', 'http://newhouse.sansha.fang.com/house/s/'],
            ['顺德', 'shunde', 'http://newhouse.shunde.fang.com/house/s/'],
            ['十堰', 'shiyan', 'http://newhouse.shiyan.fang.com/house/s/'],
            ['韶关', 'shaoguan', 'http://newhouse.shaoguan.fang.com/house/s/'],
            ['上虞', 'shangyu', 'http://newhouse.shangyu.fang.com/house/s/'],
            ['绥化', 'suihua', 'http://newhouse.suihua.fang.com/house/s/'],
            ['宿州', 'ahsuzhou', 'http://newhouse.ahsuzhou.fang.com/house/s/'],
            ['三明', 'sanming', 'http://newhouse.sanming.fang.com/house/s/'],
            ['如东', 'rudong', 'http://newhouse.rudong.fang.com/house/s/'],
            ['汝阳', 'ruyang', 'http://newhouse.ruyang.fang.com/house/s/'],
            ['任丘', 'renqiu', 'http://newhouse.renqiu.fang.com/house/s/'],
            ['如皋', 'rugao', 'http://newhouse.rugao.fang.com/house/s/'],
            ['瑞金', 'ruijin', 'http://newhouse.ruijin.fang.com/house/s/'],
            ['汝州', 'ruzhou', 'http://newhouse.ruzhou.fang.com/house/s/'],
            ['日喀则', 'rikaze', 'http://newhouse.rikaze.fang.com/house/s/'],
            ['瑞安', 'ruian', 'http://newhouse.ruian.fang.com/house/s/'],
            ['栖霞', 'qixia', 'http://newhouse.qixia.fang.com/house/s/'],
            ['邛崃', 'qionglai', 'http://newhouse.qionglai.fang.com/house/s/'],
            ['清徐', 'qingxu', 'http://newhouse.qingxu.fang.com/house/s/'],
            ['青龙', 'hbql', 'http://newhouse.hbql.fang.com/house/s/'],
            ['迁西', 'qianxi', 'http://newhouse.qianxi.fang.com/house/s/'],
            ['日照', 'rz', 'http://newhouse.rz.fang.com/house/s/'],
            ['泉港', 'quangang', 'http://newhouse.quangang.fang.com/house/s/'],
            ['泉山', 'quanshan', 'http://newhouse.quanshan.fang.com/house/s/'],
            ['荣昌', 'cqrongchang', 'http://newhouse.cqrongchang.fang.com/house/s/'],
            ['启东', 'qidong', 'http://newhouse.qidong.fang.com/house/s/'],
            ['潜江', 'qj', 'http://newhouse.qj.fang.com/house/s/'],
            ['綦江', 'qijiang', 'http://newhouse.qijiang.fang.com/house/s/'],
            ['黔南', 'qiannan', 'http://newhouse.qiannan.fang.com/house/s/'],
            ['清镇', 'qingzhen', 'http://newhouse.qingzhen.fang.com/house/s/'],
            ['七台河', 'qitaihe', 'http://newhouse.qitaihe.fang.com/house/s/'],
            ['黔江', 'qianjiang', 'http://newhouse.qianjiang.fang.com/house/s/'],
            ['钦州', 'qinzhou', 'http://newhouse.qinzhou.fang.com/house/s/'],
            ['庆阳', 'qingyang', 'http://newhouse.qingyang.fang.com/house/s/'],
            ['青州', 'qingzhou', 'http://newhouse.qingzhou.fang.com/house/s/'],
            ['迁安', 'qianan', 'http://newhouse.qianan.fang.com/house/s/'],
            ['曲靖', 'qujing', 'http://newhouse.qujing.fang.com/house/s/'],
            ['黔西南', 'qianxinan', 'http://newhouse.qianxinan.fang.com/house/s/'],
            ['清远', 'qingyuan', 'http://newhouse.qingyuan.fang.com/house/s/'],
            ['齐齐哈尔', 'qiqihaer', 'http://newhouse.qiqihaer.fang.com/house/s/'],
            ['彭州', 'pengzhou', 'http://newhouse.pengzhou.fang.com/house/s/'],
            ['普宁', 'puning', 'http://newhouse.puning.fang.com/house/s/'],
            ['蓬莱', 'penglai', 'http://newhouse.penglai.fang.com/house/s/'],
            ['黔东南', 'qiandongnan', 'http://newhouse.qiandongnan.fang.com/house/s/'],
            ['衢州', 'quzhou', 'http://newhouse.quzhou.fang.com/house/s/'],
            ['平阴', 'sdpy', 'http://newhouse.sdpy.fang.com/house/s/'],
            ['平山', 'hbps', 'http://newhouse.hbps.fang.com/house/s/'],
            ['平湖', 'pinghu', 'http://newhouse.pinghu.fang.com/house/s/'],
            ['沛县', 'peixian', 'http://newhouse.peixian.fang.com/house/s/'],
            ['莆田', 'putian', 'http://newhouse.putian.fang.com/house/s/'],
            ['邳州', 'pizhou', 'http://newhouse.pizhou.fang.com/house/s/'],
            ['平潭', 'pingtan', 'http://newhouse.pingtan.fang.com/house/s/'],
            ['攀枝花', 'panzhihua', 'http://newhouse.panzhihua.fang.com/house/s/'],
            ['平度', 'pingdu', 'http://newhouse.pingdu.fang.com/house/s/'],
            ['平凉', 'pingliang', 'http://newhouse.pingliang.fang.com/house/s/'],
            ['濮阳', 'puyang', 'http://newhouse.puyang.fang.com/house/s/'],
            ['普兰店', 'pulandian', 'http://newhouse.pulandian.fang.com/house/s/'],
            ['普洱', 'puer', 'http://newhouse.puer.fang.com/house/s/'],
            ['平顶山', 'pingdingshan', 'http://newhouse.pingdingshan.fang.com/house/s/'],
            ['萍乡', 'pingxiang', 'http://newhouse.pingxiang.fang.com/house/s/'],
            ['宁乡', 'ningxiang', 'http://newhouse.ningxiang.fang.com/house/s/'],
            ['盘锦', 'panjin', 'http://newhouse.panjin.fang.com/house/s/'],
            ['那曲', 'naqu', 'http://newhouse.naqu.fang.com/house/s/'],
            ['南安', 'nanan', 'http://newhouse.nanan.fang.com/house/s/'],
            ['宁海', 'ninghai', 'http://newhouse.ninghai.fang.com/house/s/'],
            ['怒江', 'nujiang', 'http://newhouse.nujiang.fang.com/house/s/'],
            ['农安', 'nongan', 'http://newhouse.nongan.fang.com/house/s/'],
            ['内江', 'neijiang', 'http://newhouse.neijiang.fang.com/house/s/'],
            ['梅州', 'meizhou', 'http://newhouse.meizhou.fang.com/house/s/'],
            ['南平', 'nanping', 'http://newhouse.nanping.fang.com/house/s/'],
            ['闽清', 'minqing', 'http://newhouse.minqing.fang.com/house/s/'],
            ['孟津', 'mengjin', 'http://newhouse.mengjin.fang.com/house/s/'],
            ['南川', 'cqnanchuan', 'http://newhouse.cqnanchuan.fang.com/house/s/'],
            ['南阳', 'nanyang', 'http://newhouse.nanyang.fang.com/house/s/'],
            ['眉山', 'meishan', 'http://newhouse.meishan.fang.com/house/s/'],
            ['茂名', 'maoming', 'http://newhouse.maoming.fang.com/house/s/'],
            ['宁德', 'ningde', 'http://newhouse.ningde.fang.com/house/s/'],
            ['罗源', 'luoyuan', 'http://newhouse.luoyuan.fang.com/house/s/'],
            ['牡丹江', 'mudanjiang', 'http://newhouse.mudanjiang.fang.com/house/s/'],
            ['栾川', 'luanchuan', 'http://newhouse.luanchuan.fang.com/house/s/'],
            ['耒阳', 'leiyang', 'http://newhouse.leiyang.fang.com/house/s/'],
            ['醴陵', 'liling', 'http://newhouse.liling.fang.com/house/s/'],
            ['临清', 'linqing', 'http://newhouse.linqing.fang.com/house/s/'],
            ['乐亭', 'hblt', 'http://newhouse.hblt.fang.com/house/s/'],
            ['龙门', 'gdlm', 'http://newhouse.gdlm.fang.com/house/s/'],
            ['梁平', 'cqliangping', 'http://newhouse.cqliangping.fang.com/house/s/'],
            ['滦南', 'luannan', 'http://newhouse.luannan.fang.com/house/s/'],
            ['兰考', 'lankao', 'http://newhouse.lankao.fang.com/house/s/'],
            ['老河口', 'lhk', 'http://newhouse.lhk.fang.com/house/s/'],
            ['蓝田', 'lantian', 'http://newhouse.lantian.fang.com/house/s/'],
            ['庐江', 'lujiang', 'http://newhouse.lujiang.fang.com/house/s/'],
            ['连江', 'lianjiang', 'http://newhouse.lianjiang.fang.com/house/s/'],
            ['莱阳', 'laiyang', 'http://newhouse.laiyang.fang.com/house/s/'],
            ['浏阳', 'liuyang', 'http://newhouse.liuyang.fang.com/house/s/'],
            ['洛宁', 'luoning', 'http://newhouse.luoning.fang.com/house/s/'],
            ['临安', 'linan', 'http://newhouse.linan.fang.com/house/s/'],
            ['滦县', 'luanxian', 'http://newhouse.luanxian.fang.com/house/s/'],
            ['莱西', 'laixi', 'http://newhouse.laixi.fang.com/house/s/'],
            ['娄底', 'loudi', 'http://newhouse.loudi.fang.com/house/s/'],
            ['临夏', 'linxia', 'http://newhouse.linxia.fang.com/house/s/'],
            ['六盘水', 'liupanshui', 'http://newhouse.liupanshui.fang.com/house/s/'],
            ['拉萨', 'lasa', 'http://newhouse.lasa.fang.com/house/s/'],
            ['林芝', 'linzhi', 'http://newhouse.linzhi.fang.com/house/s/'],
            ['溧阳', 'liyang', 'http://newhouse.liyang.fang.com/house/s/'],
            ['临朐', 'linqu', 'http://newhouse.linqu.fang.com/house/s/'],
            ['临海', 'linhai', 'http://newhouse.linhai.fang.com/house/s/'],
            ['辽中', 'liaozhong', 'http://newhouse.liaozhong.fang.com/house/s/'],
            ['临沧', 'lincang', 'http://newhouse.lincang.fang.com/house/s/'],
            ['莱州', 'laizhou', 'http://newhouse.laizhou.fang.com/house/s/'],
            ['六安', 'luan', 'http://newhouse.luan.fang.com/house/s/'],
            ['来宾', 'laibin', 'http://newhouse.laibin.fang.com/house/s/'],
            ['陇南', 'longnan', 'http://newhouse.longnan.fang.com/house/s/'],
            ['莱芜', 'laiwu', 'http://newhouse.laiwu.fang.com/house/s/'],
            ['龙口', 'longkou', 'http://newhouse.longkou.fang.com/house/s/'],
            ['凉山', 'liangshan', 'http://newhouse.liangshan.fang.com/house/s/'],
            ['龙岩', 'longyan', 'http://newhouse.longyan.fang.com/house/s/'],
            ['临猗', 'sxly', 'http://newhouse.sxly.fang.com/house/s/'],
            ['辽阳', 'liaoyang', 'http://newhouse.liaoyang.fang.com/house/s/'],
            ['龙海', 'longhai', 'http://newhouse.longhai.fang.com/house/s/'],
            ['临汾', 'linfen', 'http://newhouse.linfen.fang.com/house/s/'],
            ['吕梁', 'lvliang', 'http://newhouse.lvliang.fang.com/house/s/'],
            ['丽江', 'lijiang', 'http://newhouse.lijiang.fang.com/house/s/'],
            ['辽源', 'liaoyuan', 'http://newhouse.liaoyuan.fang.com/house/s/'],
            ['泸州', 'luzhou', 'http://newhouse.luzhou.fang.com/house/s/'],
            ['丽水', 'ls', 'http://newhouse.ls.fang.com/house/s/'],
            ['开封', 'kaifeng', 'http://newhouse.kaifeng.fang.com/house/s/'],
            ['开阳', 'kaiyang', 'http://newhouse.kaiyang.fang.com/house/s/'],
            ['开平', 'kaiping', 'http://newhouse.kaiping.fang.com/house/s/'],
            ['奎屯', 'kuitun', 'http://newhouse.kuitun.fang.com/house/s/'],
            ['漯河', 'luohe', 'http://newhouse.luohe.fang.com/house/s/'],
            ['克孜勒苏', 'kzls', 'http://newhouse.kzls.fang.com/house/s/'],
            ['库尔勒', 'kuerle', 'http://newhouse.kuerle.fang.com/house/s/'],
            ['喀什', 'kashi', 'http://newhouse.kashi.fang.com/house/s/'],
            ['克拉玛依', 'kelamayi', 'http://newhouse.kelamayi.fang.com/house/s/'],
            ['胶州', 'jiaozhou', 'http://newhouse.jiaozhou.fang.com/house/s/'],
            ['姜堰', 'jiangyan', 'http://newhouse.jiangyan.fang.com/house/s/'],
            ['冀州', 'jz', 'http://newhouse.jz.fang.com/house/s/'],
            ['京山', 'hbjs', 'http://newhouse.hbjs.fang.com/house/s/'],
            ['简阳', 'jianyang', 'http://newhouse.jianyang.fang.com/house/s/'],
            ['句容', 'jr', 'http://newhouse.jr.fang.com/house/s/'],
            ['开县', 'cqkaixian', 'http://newhouse.cqkaixian.fang.com/house/s/'],
            ['金湖', 'jinhu', 'http://newhouse.jinhu.fang.com/house/s/'],
            ['济阳', 'sdjy', 'http://newhouse.sdjy.fang.com/house/s/'],
            ['金堂', 'scjt', 'http://newhouse.scjt.fang.com/house/s/'],
            ['康平', 'kangping', 'http://newhouse.kangping.fang.com/house/s/'],
            ['荆门', 'jingmen', 'http://newhouse.jingmen.fang.com/house/s/'],
            ['晋州', 'hbjz', 'http://newhouse.hbjz.fang.com/house/s/'],
            ['建德', 'jiande', 'http://newhouse.jiande.fang.com/house/s/'],
            ['嘉峪关', 'jiayuguan', 'http://newhouse.jiayuguan.fang.com/house/s/'],
            ['蓟州', 'jizhou', 'http://newhouse.jizhou.fang.com/house/s/'],
            ['济源', 'jiyuan', 'http://newhouse.jiyuan.fang.com/house/s/'],
            ['锦州', 'jinzhou', 'http://newhouse.jinzhou.fang.com/house/s/'],
            ['进贤', 'jinxian', 'http://newhouse.jinxian.fang.com/house/s/'],
            ['江津', 'cqjiangjin', 'http://newhouse.cqjiangjin.fang.com/house/s/'],
            ['景德镇', 'jingdezhen', 'http://newhouse.jingdezhen.fang.com/house/s/'],
            ['靖江', 'jingjiang', 'http://newhouse.jingjiang.fang.com/house/s/'],
            ['胶南', 'jiaonan', 'http://newhouse.jiaonan.fang.com/house/s/'],
            ['即墨', 'jimo', 'http://newhouse.jimo.fang.com/house/s/'],
            ['江都', 'jiangdu', 'http://newhouse.jiangdu.fang.com/house/s/'],
            ['酒泉', 'jiuquan', 'http://newhouse.jiuquan.fang.com/house/s/'],
            ['金昌', 'jinchang', 'http://newhouse.jinchang.fang.com/house/s/'],
            ['金坛', 'jintan', 'http://newhouse.jintan.fang.com/house/s/'],
            ['靖安', 'jxja', 'http://newhouse.jxja.fang.com/house/s/'],
            ['揭阳', 'jieyang', 'http://newhouse.jieyang.fang.com/house/s/'],
            ['佳木斯', 'jiamusi', 'http://newhouse.jiamusi.fang.com/house/s/'],
            ['荆州', 'jingzhou', 'http://newhouse.jingzhou.fang.com/house/s/'],
            ['吉安', 'jian', 'http://newhouse.jian.fang.com/house/s/'],
            ['鸡西', 'jixi', 'http://newhouse.jixi.fang.com/house/s/'],
            ['晋中', 'jinzhong', 'http://newhouse.jinzhong.fang.com/house/s/'],
            ['晋城', 'jc', 'http://newhouse.jc.fang.com/house/s/'],
            ['焦作', 'jiaozuo', 'http://newhouse.jiaozuo.fang.com/house/s/'],
            ['金华', 'jh', 'http://newhouse.jh.fang.com/house/s/'],
            ['海盐', 'haiyan', 'http://newhouse.haiyan.fang.com/house/s/'],
            ['汉南', 'whhn', 'http://newhouse.whhn.fang.com/house/s/'],
            ['海城', 'haicheng', 'http://newhouse.haicheng.fang.com/house/s/'],
            ['桦甸', 'huadian', 'http://newhouse.huadian.fang.com/house/s/'],
            ['鹤山', 'heshan', 'http://newhouse.heshan.fang.com/house/s/'],
            ['怀仁', 'huairen', 'http://newhouse.huairen.fang.com/house/s/'],
            ['海宁', 'haining', 'http://newhouse.haining.fang.com/house/s/'],
            ['海安', 'haian', 'http://newhouse.haian.fang.com/house/s/'],
            ['和田', 'hetian', 'http://newhouse.hetian.fang.com/house/s/'],
            ['惠东', 'huidong', 'http://newhouse.huidong.fang.com/house/s/'],
            ['海拉尔', 'hailaer', 'http://newhouse.hailaer.fang.com/house/s/'],
            ['横县', 'hengxian', 'http://newhouse.hengxian.fang.com/house/s/'],
            ['海西', 'haixi', 'http://newhouse.haixi.fang.com/house/s/'],
            ['海林', 'hailin', 'http://newhouse.hailin.fang.com/house/s/'],
            ['黄南', 'huangnan', 'http://newhouse.huangnan.fang.com/house/s/'],
            ['合川', 'hechuan', 'http://newhouse.hechuan.fang.com/house/s/'],
            ['河源', 'heyuan', 'http://newhouse.heyuan.fang.com/house/s/'],
            ['贺州', 'hezhou', 'http://newhouse.hezhou.fang.com/house/s/'],
            ['呼伦贝尔', 'hlbe', 'http://newhouse.hlbe.fang.com/house/s/'],
            ['哈密', 'hami', 'http://newhouse.hami.fang.com/house/s/'],
            ['海阳', 'haiyang', 'http://newhouse.haiyang.fang.com/house/s/'],
            ['黑河', 'heihe', 'http://newhouse.heihe.fang.com/house/s/'],
            ['黄山', 'huangshan', 'http://newhouse.huangshan.fang.com/house/s/'],
            ['户县', 'huxian', 'http://newhouse.huxian.fang.com/house/s/'],
            ['海北', 'haibei', 'http://newhouse.haibei.fang.com/house/s/'],
            ['怀远', 'huaiyuan', 'http://newhouse.huaiyuan.fang.com/house/s/'],
            ['淮南', 'huainan', 'http://newhouse.huainan.fang.com/house/s/'],
            ['怀化', 'huaihua', 'http://newhouse.huaihua.fang.com/house/s/'],
            ['葫芦岛', 'huludao', 'http://newhouse.huludao.fang.com/house/s/'],
            ['红河', 'honghe', 'http://newhouse.honghe.fang.com/house/s/'],
            ['河池', 'hechi', 'http://newhouse.hechi.fang.com/house/s/'],
            ['鹤岗', 'hegang', 'http://newhouse.hegang.fang.com/house/s/'],
            ['霍邱', 'huoqiu', 'http://newhouse.huoqiu.fang.com/house/s/'],
            ['汉中', 'hanzhong', 'http://newhouse.hanzhong.fang.com/house/s/'],
            ['海门', 'haimen', 'http://newhouse.haimen.fang.com/house/s/'],
            ['淮北', 'huaibei', 'http://newhouse.huaibei.fang.com/house/s/'],
            ['黄石', 'huangshi', 'http://newhouse.huangshi.fang.com/house/s/'],
            ['惠安', 'huian', 'http://newhouse.huian.fang.com/house/s/'],
            ['黄冈', 'huanggang', 'http://newhouse.huanggang.fang.com/house/s/'],
            ['鹤壁', 'hebi', 'http://newhouse.hebi.fang.com/house/s/'],
            ['海东', 'haidong', 'http://newhouse.haidong.fang.com/house/s/'],
            ['菏泽', 'heze', 'http://newhouse.heze.fang.com/house/s/'],
            ['公主岭', 'gongzhuling', 'http://newhouse.gongzhuling.fang.com/house/s/'],
            ['固镇', 'guzhen', 'http://newhouse.guzhen.fang.com/house/s/'],
            ['高碑店', 'gaobeidian', 'http://newhouse.gaobeidian.fang.com/house/s/'],
            ['高淳', 'njgc', 'http://newhouse.njgc.fang.com/house/s/'],
            ['高陵', 'gaoling', 'http://newhouse.gaoling.fang.com/house/s/'],
            ['高邮', 'gaoyou', 'http://newhouse.gaoyou.fang.com/house/s/'],
            ['高密', 'gaomi', 'http://newhouse.gaomi.fang.com/house/s/'],
            ['巩义', 'gongyi', 'http://newhouse.gongyi.fang.com/house/s/'],
            ['广安', 'guangan', 'http://newhouse.guangan.fang.com/house/s/'],
            ['广元', 'guangyuan', 'http://newhouse.guangyuan.fang.com/house/s/'],
            ['甘南', 'gannan', 'http://newhouse.gannan.fang.com/house/s/'],
            ['贵港', 'guigang', 'http://newhouse.guigang.fang.com/house/s/'],
            ['固原', 'guyuan', 'http://newhouse.guyuan.fang.com/house/s/'],
            ['甘孜', 'ganzi', 'http://newhouse.ganzi.fang.com/house/s/'],
            ['阜宁', 'funing', 'http://newhouse.funing.fang.com/house/s/'],
            ['福安', 'fuan', 'http://newhouse.fuan.fang.com/house/s/'],
            ['广饶', 'guangrao', 'http://newhouse.guangrao.fang.com/house/s/'],
            ['繁昌', 'fanchang', 'http://newhouse.fanchang.fang.com/house/s/'],
            ['丰县', 'jsfx', 'http://newhouse.jsfx.fang.com/house/s/'],
            ['法库', 'faku', 'http://newhouse.faku.fang.com/house/s/'],
            ['肥西', 'feixi', 'http://newhouse.feixi.fang.com/house/s/'],
            ['奉节', 'cqfengjie', 'http://newhouse.cqfengjie.fang.com/house/s/'],
            ['凤城', 'fengcheng', 'http://newhouse.fengcheng.fang.com/house/s/'],
            ['丰都', 'fengdu', 'http://newhouse.fengdu.fang.com/house/s/'],
            ['抚州', 'jxfuzhou', 'http://newhouse.jxfuzhou.fang.com/house/s/'],
            ['涪陵', 'fuling', 'http://newhouse.fuling.fang.com/house/s/'],
            ['防城港', 'fangchenggang', 'http://newhouse.fangchenggang.fang.com/house/s/'],
            ['阜新', 'fuxin', 'http://newhouse.fuxin.fang.com/house/s/'],
            ['奉化', 'fenghua', 'http://newhouse.fenghua.fang.com/house/s/'],
            ['肥东', 'feidong', 'http://newhouse.feidong.fang.com/house/s/'],
            ['富阳', 'zjfy', 'http://newhouse.zjfy.fang.com/house/s/'],
            ['肥城', 'feicheng', 'http://newhouse.feicheng.fang.com/house/s/'],
            ['阜阳', 'fuyang', 'http://newhouse.fuyang.fang.com/house/s/'],
            ['抚顺', 'fushun', 'http://newhouse.fushun.fang.com/house/s/'],
            ['果洛', 'guoluo', 'http://newhouse.guoluo.fang.com/house/s/'],
            ['丰城', 'jxfc', 'http://newhouse.jxfc.fang.com/house/s/'],
            ['峨眉山', 'emeishan', 'http://newhouse.emeishan.fang.com/house/s/'],
            ['恩施', 'enshi', 'http://newhouse.enshi.fang.com/house/s/'],
            ['鄂州', 'ezhou', 'http://newhouse.ezhou.fang.com/house/s/'],
            ['恩平', 'enping', 'http://newhouse.enping.fang.com/house/s/'],
            ['邓州', 'dengzhou', 'http://newhouse.dengzhou.fang.com/house/s/'],
            ['儋州', 'danzhou', 'http://newhouse.danzhou.fang.com/house/s/'],
            ['德化', 'dh', 'http://newhouse.dh.fang.com/house/s/'],
            ['鄂尔多斯', 'erds', 'http://newhouse.erds.fang.com/house/s/'],
            ['都江堰', 'dujiangyan', 'http://newhouse.dujiangyan.fang.com/house/s/'],
            ['福清', 'fq', 'http://newhouse.fq.fang.com/house/s/'],
            ['东海', 'donghai', 'http://newhouse.donghai.fang.com/house/s/'],
            ['大邑', 'dayi', 'http://newhouse.dayi.fang.com/house/s/'],
            ['当阳', 'dangyang', 'http://newhouse.dangyang.fang.com/house/s/'],
            ['东方', 'dongfang', 'http://newhouse.dongfang.fang.com/house/s/'],
            ['定州', 'dingzhou', 'http://newhouse.dingzhou.fang.com/house/s/'],
            ['垫江', 'cqdianjiang', 'http://newhouse.cqdianjiang.fang.com/house/s/'],
            ['德惠', 'dehui', 'http://newhouse.dehui.fang.com/house/s/'],
            ['定西', 'dingxi', 'http://newhouse.dingxi.fang.com/house/s/'],
            ['登封', 'dengfeng', 'http://newhouse.dengfeng.fang.com/house/s/'],
            ['大兴安岭', 'dxal', 'http://newhouse.dxal.fang.com/house/s/'],
            ['迪庆', 'diqing', 'http://newhouse.diqing.fang.com/house/s/'],
            ['当涂', 'dangtu', 'http://newhouse.dangtu.fang.com/house/s/'],
            ['东台', 'dongtai', 'http://newhouse.dongtai.fang.com/house/s/'],
            ['大理', 'dali', 'http://newhouse.dali.fang.com/house/s/'],
            ['大同', 'datong', 'http://newhouse.datong.fang.com/house/s/'],
            ['达州', 'dazhou', 'http://newhouse.dazhou.fang.com/house/s/'],
            ['德州', 'dz', 'http://newhouse.dz.fang.com/house/s/'],
            ['德阳', 'deyang', 'http://newhouse.deyang.fang.com/house/s/'],
            ['大足', 'cqdazu', 'http://newhouse.cqdazu.fang.com/house/s/'],
            ['德清', 'deqing', 'http://newhouse.deqing.fang.com/house/s/'],
            ['东港', 'donggang', 'http://newhouse.donggang.fang.com/house/s/'],
            ['淳安', 'chunan', 'http://newhouse.chunan.fang.com/house/s/'],
            ['德宏', 'dehong', 'http://newhouse.dehong.fang.com/house/s/'],
            ['长岛', 'ytcd', 'http://newhouse.ytcd.fang.com/house/s/'],
            ['常宁', 'cn', 'http://newhouse.cn.fang.com/house/s/'],
            ['丹东', 'dandong', 'http://newhouse.dandong.fang.com/house/s/'],
            ['长清', 'jncq', 'http://newhouse.jncq.fang.com/house/s/'],
            ['长丰', 'ahcf', 'http://newhouse.ahcf.fang.com/house/s/'],
            ['昌邑', 'changyi', 'http://newhouse.changyi.fang.com/house/s/'],
            ['长葛', 'changge', 'http://newhouse.changge.fang.com/house/s/'],
            ['昌都', 'changdu', 'http://newhouse.changdu.fang.com/house/s/'],
            ['东营', 'dy', 'http://newhouse.dy.fang.com/house/s/'],
            ['昌黎', 'changli', 'http://newhouse.changli.fang.com/house/s/'],
            ['长兴', 'changxing', 'http://newhouse.changxing.fang.com/house/s/'],
            ['沧州', 'cangzhou', 'http://newhouse.cangzhou.fang.com/house/s/'],
            ['潮州', 'chaozhou', 'http://newhouse.chaozhou.fang.com/house/s/'],
            ['长乐', 'changle', 'http://newhouse.changle.fang.com/house/s/'],
            ['常德', 'changde', 'http://newhouse.changde.fang.com/house/s/'],
            ['长寿', 'cqchangshou', 'http://newhouse.cqchangshou.fang.com/house/s/'],
            ['池州', 'chizhou', 'http://newhouse.chizhou.fang.com/house/s/'],
            ['崇左', 'chongzuo', 'http://newhouse.chongzuo.fang.com/house/s/'],
            ['昌乐', 'sdcl', 'http://newhouse.sdcl.fang.com/house/s/'],
            ['霸州', 'hbbz', 'http://newhouse.hbbz.fang.com/house/s/'],
            ['慈溪', 'cixi', 'http://newhouse.cixi.fang.com/house/s/'],
            ['崇州', 'chongzhou', 'http://newhouse.chongzhou.fang.com/house/s/'],
            ['滁州', 'chuzhou', 'http://newhouse.chuzhou.fang.com/house/s/'],
            ['赤峰', 'chifeng', 'http://newhouse.chifeng.fang.com/house/s/'],
            ['巴彦', 'bayan', 'http://newhouse.bayan.fang.com/house/s/'],
            ['宾县', 'binxian', 'http://newhouse.binxian.fang.com/house/s/'],
            ['博罗', 'boluo', 'http://newhouse.boluo.fang.com/house/s/'],
            ['宾阳', 'gxby', 'http://newhouse.gxby.fang.com/house/s/'],
            ['巴中', 'bazhong', 'http://newhouse.bazhong.fang.com/house/s/'],
            ['白山', 'baishan', 'http://newhouse.baishan.fang.com/house/s/'],
            ['宝应', 'baoying', 'http://newhouse.baoying.fang.com/house/s/'],
            ['白银', 'baiyin', 'http://newhouse.baiyin.fang.com/house/s/'],
            ['巴彦淖尔', 'byne', 'http://newhouse.byne.fang.com/house/s/'],
            ['亳州', 'bozhou', 'http://newhouse.bozhou.fang.com/house/s/'],
            ['毕节', 'bijie', 'http://newhouse.bijie.fang.com/house/s/'],
            ['滨州', 'binzhou', 'http://newhouse.binzhou.fang.com/house/s/'],
            ['白城', 'baicheng', 'http://newhouse.baicheng.fang.com/house/s/'],
            ['百色', 'baise', 'http://newhouse.baise.fang.com/house/s/'],
            ['保山', 'baoshan', 'http://newhouse.baoshan.fang.com/house/s/'],
            ['璧山', 'cqbishan', 'http://newhouse.cqbishan.fang.com/house/s/'],
            ['本溪', 'benxi', 'http://newhouse.benxi.fang.com/house/s/'],
            ['宝鸡', 'baoji', 'http://newhouse.baoji.fang.com/house/s/'],
            ['阿拉尔', 'alaer', 'http://newhouse.alaer.fang.com/house/s/'],
            ['阿拉善盟', 'alsm', 'http://newhouse.alsm.fang.com/house/s/'],
            ['安达', 'anda', 'http://newhouse.anda.fang.com/house/s/'],
            ['安溪', 'fjax', 'http://newhouse.fjax.fang.com/house/s/'],
            ['阿克苏', 'akesu', 'http://newhouse.akesu.fang.com/house/s/'],
            ['阿坝州', 'abazhou', 'http://newhouse.abazhou.fang.com/house/s/'],
            ['安顺', 'anshun', 'http://newhouse.anshun.fang.com/house/s/'],
            ['安丘', 'anqiu', 'http://newhouse.anqiu.fang.com/house/s/'],
            ['安宁', 'anning', 'http://newhouse.anning.fang.com/house/s/'],
            ['安阳', 'anyang', 'http://newhouse.anyang.fang.com/house/s/'],
            ['安庆', 'anqing', 'http://newhouse.anqing.fang.com/house/s/'],
            ['安康', 'ankang', 'http://newhouse.ankang.fang.com/house/s/']
        ]

        #
        # 获取 搜房部分城市
        #

        for child in citybox:
            city = child[0]
            city_id = child[1]
            city_url = child[2]

            print('[' + city + ',' + city_id + ',' + city_url + '],')
            citys = {
                'website': '搜房网', 'web_url': 'fang.com',
                'city': city, 'city_id': city_id, 'city_url': city_url
            }
            yield scrapy.Request(city_url, callback=self.parse_city_estate, meta=citys)

    def parse_city_estate(self, response):
        meta = response.meta
        data = response.body
        soup = bs4.BeautifulSoup(data, 'html.parser')

        #
        # 获取城市楼盘 信息
        #

        result = soup.select('.sslalone')
        for child in result:
            estate_id = child.get('id')
            estatebox = child.select('.sslainfor')[0]
            estates = estatebox.findAll('li')[0]
            estate = estates.find_all('a')[0].get_text().strip()
            estate_url = estates.find_all('a')[0].get('href')
            estate_id2 = estates.find_all('a')[0].get('href').split('/')[2].replace('.fang.com', '').replace('esf.', '')
            estate_class = estates.find_all('span')[0].get_text()
            address = estates.find_next_sibling('li').get_text().strip().replace('查看地图', '').strip()
            developers = estatebox.findAll('li')[3]
            developer = developers.get_text().strip()
            if developer == '查看详情楼盘图片业主论坛':
                developer = ''

            meta['estate'] = estate
            meta['estate_id'] = estate_id
            meta['estate_id2'] = estate_id2
            meta['estate_url'] = estate_url
            meta['estate_class'] = estate_class
            meta['address'] = address
            meta['developer'] = developer
            print('1111',estate, estate_id,estate_url)
            yield scrapy.Request(estate_url, callback=self.parse_get_estate, meta=meta)

        #
        # 进行 翻页 抓取
        #

        page = soup.select('.page > li')
        if page:
            totle_num = page[-1].span.get_text()
            if int(totle_num) > 20:
                num = int(totle_num) % 20
                if num == 0:
                    page_num = int(totle_num) / 20
                else:
                    page_num = int(int(totle_num) / 20) + 1

                current_url = response.url
                current_num = response.url.split('/')[5]
                if current_num == '':
                    current_num = 1
                else:
                    current_num = int(response.url.split('/')[5].replace('b9', '').strip())

                if int(current_num) < page_num:
                    if current_num == 1:
                        next_url = current_url.replace('/s/', '/s/b92/')
                    else:
                        next_url = current_url.replace('/s/b9' + str(current_num) + '/',
                                                       '/s/b9' + str(int(current_num) + 1) + '/')

                    yield scrapy.Request(next_url, callback=self.parse_city_estate, meta=meta)


    def parse_get_estate(self, response):
        meta = response.meta
        data = response.body
        soup = bs4.BeautifulSoup(data, 'html5lib')
        detal = soup.select('#orginalNaviBox > a')

        #
        # 获取 楼盘详细页面url并进入 如果失败 进入到 失败处理方法
        #

        if detal:
            origin = detal[1].get_text().strip()
            origin_url = detal[1].get('href')

            # ------ 判断 详情 二/三 进入详情页面 parse_get_estate_result

            if origin == '楼盘详情' or origin == '详细信息':
                yield scrapy.Request(origin_url, callback=self.parse_get_estate_result, meta=meta,
                                     errback=lambda x: self.parse_error_result(x, meta))

            else:
                origin1 = detal[2].get_text().strip()
                origin_url1 = detal[2].get('href')
                if origin1 == '楼盘详情' or origin1 == '详细信息':
                    yield scrapy.Request(origin_url1, callback=self.parse_get_estate_result, meta=meta,
                                         errback=lambda x: self.parse_error_result(x, meta))
                else:

                    # ----- 判断 二手房 进入到二手房详细页面 parse_get_estate_result2

                    ershoufang = ''
                    ershoufang_url = '';
                    if origin == '小区详情':
                        ershoufang = origin
                        ershoufang_url = origin_url
                    if origin1 == '小区详情':
                        ershoufang = origin1
                        ershoufang_url = origin_url1

                    if ershoufang == '小区详情':
                        yield scrapy.Request(ershoufang_url, callback=self.parse_get_estate_result2, meta=meta,
                                             errback=lambda x: self.parse_error_result(x, meta))
                        # print('3333',meta['estate'])
                    else:

                        # ------ 如果不在三界、五行之内 直接入库

                        item = SoufItem()
                        item['website'] = meta['website']
                        item['web_url'] = meta['web_url']
                        item['city'] = meta['city']
                        item['city_id'] = meta['city_id']
                        item['estate_class'] = meta['estate_class']
                        item['estate'] = meta['estate']
                        item['estate_id'] = meta['estate_id']
                        item['estate_id2'] = meta['estate_id2']
                        item['estate_url'] = meta['estate_url']
                        item['address'] = meta['address']
                        item['developer'] = meta['developer']
                        item['building_class'] = ''
                        item['decoration'] = ''
                        item['estate1'] = ''
                        item['estate2'] = ''
                        item['estate3'] = ''
                        item['estate4'] = ''
                        item['area'] = ''
                        # print('4444',meta['estate'])
                        yield item
        else:

            # ----- 如果直接没有 楼盘详细导航 直接入库

            item = SoufItem()
            item['website'] = meta['website']
            item['web_url'] = meta['web_url']
            item['city'] = meta['city']
            item['city_id'] = meta['city_id']
            item['estate_class'] = meta['estate_class']
            item['estate'] = meta['estate']
            item['estate_id'] = meta['estate_id']
            item['estate_id2'] = meta['estate_id2']
            item['estate_url'] = meta['estate_url']
            item['address'] = meta['address']
            item['developer'] = meta['developer']
            item['building_class'] = ''
            item['decoration'] = ''
            item['estate1'] = ''
            item['estate2'] = ''
            item['estate3'] = ''
            item['estate4'] = ''
            item['area'] = ''
            # print('5555',meta['estate'])
            yield item

    def parse_get_estate_result2(self, response):
        meta = response.meta
        estate = meta['estate']
        data = response.body
        soup = bs4.BeautifulSoup(data, 'html5lib')
        #
        # 获取 楼盘详细信息
        # --------------------别名---------------------
        #
        estate_by_names = soup.select('.con_max')
        estate1 = ''
        estate2 = ''
        estate3 = ''
        estate4 = ''
        if estate_by_names:
            estate_by_name = estate_by_names[0].get_text().replace('别名：', '').split(' ')
            estate_num = len(estate_by_name)
            if estate_num < 4:
                estate_by_name = estate_by_name + [''] * (4 - estate_num)

            estate1 = estate_by_name[0]
            estate2 = estate_by_name[1]
            estate3 = estate_by_name[2]
            estate4 = estate_by_name[3]
        # --------------------building_class---------------------
        estate_detail = soup.find_all('.inforwrap > dl > dd')
        if estate_detail:
            for child in estate_detail:
                name = child.strong.get_text()
                if name == '小区地址：':
                    address = child.get_text()
                if name == '所属区域：':
                    area = child.get_text().split(' ')[0]
                if name == '建筑类别：':
                    building_class = child.get_text()
                if name == '项目特色：':
                    decoration = child.get_text()
                if name == '开 发 商：':
                    developer = child.get_text()

        # --------------------decoration---------------------
        decoration = ''
        item = SoufItem()
        item['website'] = meta['website']
        item['web_url'] = meta['web_url']
        item['city'] = meta['city']
        item['city_id'] = meta['city_id']
        item['area'] = ''
        item['estate_class'] = meta['estate_class']
        item['estate'] = estate
        item['estate1'] = estate1
        item['estate2'] = estate2
        item['estate3'] = estate3
        item['estate4'] = estate4
        item['estate_id'] = meta['estate_id']
        item['estate_id2'] = meta['estate_id2']
        item['estate_url'] = meta['estate_url']
        item['developer'] = meta['developer']
        item['address'] = meta['address']
        item['building_class'] = building_class
        item['decoration'] = decoration
        print('7777', estate, meta['estate_url'])
        yield item

    def parse_get_estate_result(self, response):
        meta = response.meta
        estate = meta['estate']
        data = response.body
        soup = bs4.BeautifulSoup(data, 'html5lib')

        #
        # 获取 楼盘详细信息
        # -------------------地区---------------------
        #
        areabox = soup.find_all('p', class_='fL')
        if areabox:
            areas = soup.find_all('p', class_='fL')[0]
            area = areas.find_all('a')[2].get_text().replace('楼盘', '')
        else:
            areas = soup.find_all('p', class_='fl')[0]
            area = areas.find_all('a')[2].get_text().replace('楼盘', '')

        # --------------------别名---------------------
        estate_by_names = soup.select('.h1_label')
        estate1 = ''
        estate2 = ''
        estate3 = ''
        estate4 = ''
        if estate_by_names:
            estate_by_name = estate_by_names[0].get_text().replace('别名：', '').split(' ')
            estate_num = len(estate_by_name)
            if estate_num < 4:
                estate_by_name = estate_by_name + [''] * (4 - estate_num)

            estate1 = estate_by_name[0]
            estate2 = estate_by_name[1]
            estate3 = estate_by_name[2]
            estate4 = estate_by_name[3]

        # --------------------building_class---------------------
        estate_detail = soup.find_all('ul', class_='list')[0]
        builds = estate_detail.select('.bulid-type')[0].get_text().strip().split(' ')
        build = ''
        for child in builds:
            build = child.strip() + '、' + build
        # --------------------decoration---------------------
        decorationbox = estate_detail.select('li')[3]
        decoration = decorationbox.select('.list-right')[0].get_text().strip()
        item = SoufItem()
        item['website'] = meta['website']
        item['web_url'] = meta['web_url']
        item['city'] = meta['city']
        item['city_id'] = meta['city_id']
        item['area'] = area
        item['estate_class'] = meta['estate_class']
        item['estate'] = estate
        item['estate1'] = estate1
        item['estate2'] = estate2
        item['estate3'] = estate3
        item['estate4'] = estate4
        item['estate_id'] = meta['estate_id']
        item['estate_id2'] = meta['estate_id2']
        item['estate_url'] = meta['estate_url']
        item['developer'] = meta['developer']
        item['address'] = meta['address']
        item['building_class'] = build
        item['decoration'] = decoration
        print('7777', meta['estate'])
        yield item

    def parse_error_result(self, e, meta):

        #
        #  请求失败 直接入库
        #

        item = SoufItem()
        item['website'] = meta['website']
        item['web_url'] = meta['web_url']
        item['city'] = meta['city']
        item['city_id'] = meta['city_id']
        item['estate_class'] = meta['estate_class']
        item['estate'] = meta['estate']
        item['estate_id'] = meta['estate_id']
        item['estate_id2'] = meta['estate_id2']
        item['estate_url'] = meta['estate_url']
        item['address'] = meta['address']
        item['developer'] = meta['developer']
        item['building_class'] = ''
        item['decoration'] = ''
        item['estate1'] = ''
        item['estate2'] = ''
        item['estate3'] = ''
        item['estate4'] = ''
        item['area'] = ''
        print('error', meta['estate'])
        yield item
